package com.superman.supermarket.client.composite.orderdetail;

import java.util.Map;

import com.superman.supermarket.client.composite.preorder.info.PreorderOrderInfoModule;

/**
 * 订单详情基本信息模块
 * 
 * @author superman
 * @version 2018年8月12日下午10:28:53
 */
public class OrderDetailInfoModule extends PreorderOrderInfoModule {

	/**
	 * 构造方法
	 * 
	 * @author superman
	 * @version 2018年8月13日 下午9:31:28
	 */
	public OrderDetailInfoModule() {
		couponfeenamehtml.setText("优惠金额");
		payfeenamehtml.setText("实付款");
		choosecouponpanel.removeFromParent();
	}

	@Override
	public void setData(Map<String, Object> map) {
		float countFee = Float.parseFloat(String.valueOf(map.get("SKUS_FEE")));
		float postalFee = Float.parseFloat(String.valueOf(map.get("POSTAL_FEE")));
		float couponFee = 0;
		if (map.get("COUPON_FEE") != null)
			couponFee = Float.parseFloat(String.valueOf(map.get("COUPON_FEE")));
		float payFee = Float.parseFloat(String.valueOf(map.get("PAY_FEE")));
		countfeehtml.setHTML("<span style='color:#999;'>¥&nbsp;" + countFee + "</span>");
		postalfeehtml.setHTML("<span style='color:#999;'>¥&nbsp;" + postalFee + "</span>");
		couponfeehtml.setHTML("<span style='color:#999;'>¥&nbsp;" + couponFee + "</span>");
		payfeehtml.setHTML("<span style='color:red;font-weight:bold;'>¥&nbsp;" + payFee + "</span>");
	}

}
